Fixed loading of ASCII PNM files.
authorMichael Fulbright <drmike@redhat.com>
Wed, 10 Nov 1999 17:43:49 +0000 (17:43 +0000)
committerMichael Fulbright <drmike@src.gnome.org>
Wed, 10 Nov 1999 17:43:49 +0000 (17:43 +0000)
1999-11-10  Michael Fulbright  <drmike@redhat.com>

        * src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM
files.

* src/testpixbuf.c: Added final queued draw when done loading image.

demos/testpixbuf.c
gdk-pixbuf/ChangeLog
gdk-pixbuf/io-pnm.c

index 9d15087551237f704030f36830a896288d109847..534bef1965478cfeebdd67b284d720aae0f767f6 100644 (file)
@@ -30,6 +30,7 @@
 typedef struct {
        FILE             *imagefile;
        GdkPixbufLoader  *loader;
+       GtkWidget        **rgbwin;
        guchar           *buf;
        guint            timeout;
        guint            readlen;
@@ -446,6 +447,7 @@ update_timeout(gpointer data)
        }
 
        if (done) {
+                gtk_widget_queue_draw(*status->rgbwin);
                gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader));
                gtk_object_destroy (GTK_OBJECT(status->loader));
                fclose (status->imagefile);
@@ -561,6 +563,8 @@ main (int argc, char **argv)
                         pixbuf_loader = gdk_pixbuf_loader_new ();
                        status.loader = pixbuf_loader;
 
+                       status.rgbwin = &rgb_window;
+
                        status.buf = g_malloc (readlen);
                         gtk_signal_connect(GTK_OBJECT(pixbuf_loader),
                                            "area_prepared",
index 2d6c396c081ce7ff0c086dada91c0e083a816f64..f8db2df1d894b864746353b1ef40eb1ac43ddc02 100644 (file)
@@ -1,3 +1,10 @@
+1999-11-10  Michael Fulbright  <drmike@redhat.com>
+
+        * src/io-pnm.c (pnm_ascii_read_scanline): Fixed loading of ASCII PNM
+       files.
+
+       * src/testpixbuf.c: Added final queued draw when done loading image.
+       
 1999-11-10  Jonathan Blandford  <jrb@redhat.com>
 
        * src/gdk-pixbuf-io.c (gdk_pixbuf_load_module): removed spurious
index 5165a9e863cbde6657d5ceeba38d5c6a2218c31b..a987106ed5d3b6b45b8d39989953e93eb44229f1 100644 (file)
@@ -519,7 +519,7 @@ pnm_read_ascii_scanline (PnmLoaderContext *context)
                
                if (context->type == PNM_FORMAT_PBM) {
                        *dptr++ = data;
-                       context->output_col += 8;
+                       context->output_col += numval;
                } else {
                        context->output_col++;
                }